<?php

namespace App\BO\Coupon\CouponProductSkuCheck;

use App\Entities\CouponCodeEntity;

class CheckResultWrapper
{
    /**
     * 是否通过检查
     * @var bool
     */
    public $pass = false;

    /**
     * @var CouponCodeEntity
     */
    public $coupon;

    /**
     * 不通过原因
     * @var string
     */
    public $message = '';

    public function __construct(CouponCodeEntity $coupon)
    {
        $this->coupon = $coupon;
    }

    /**
     * @return bool
     */
    public function isPass(): bool
    {
        return $this->pass;
    }

    /**
     * @param bool $pass
     */
    public function setPass(bool $pass): void
    {
        $this->pass = $pass;
    }

    /**
     * @param string $message
     */
    public function setMessage(string $message): void
    {
        $this->message = $message;
    }

    /**
     * @return CouponCodeEntity
     */
    public function getCoupon(): CouponCodeEntity
    {
        return $this->coupon;
    }

    /**
     * @return string
     */
    public function getMessage(): string
    {
        return (string)$this->message;
    }
}
